package 序列化和反序列化;

import java.io.Serializable;

public class user implements Serializable {
    private static final long serialVersionUID = 1L;
    String name;

    // transient : 修饰的变量不参与序列化
    transient int age;

    public user(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public user() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
